import { BBM } from "./bbm";

export namespace Convertor {
  /**
   * json对象转换为类对象
   * @param json Json字符串对象
   * @returns 类对象
   */
  export function jsonToTable(json: BBM.BBM_table | undefined): BBM.BBM_table {
    let table = new BBM.BBM_table();
    if (json == undefined) return table;
    table.name = json.name;
    table.cols = json.cols;
    table.rows = json.rows;
    table.tableExtend = json.tableExtend;
    return table;
  }
}
